<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<title>消息详情</title>
<script src="js/jquery.min.js" ></script>
<script src="js/common.js" ></script>
<!--消息 脚本-->
<link rel="stylesheet" href="css/amazeui.min.css">
<script src="js/amazeui.min.js"></script>
<!--消息 脚本-->
<!--标准mui.css-->
<link rel="stylesheet" href="css/mui.min.css">
<!--App自定义的css-->
<link rel="stylesheet" type="text/css" href="css/base.css">
<link rel="stylesheet" type="text/css" href="css/common.css">
<style>
html,body,.mui-content{ background-color:#fff; }
</style>
</head>

<body>
<div id="indexVm" v-cloak>
  <header class="header mui-bar mui-bar-nav">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	<h1 class="mui-title">消息详情</h1>
    <div class="am-dropdown" data-am-dropdown>
      <span class="am-btn am-dropdown-toggle" data-am-dropdown-toggle><em class="header-notice-tips"></em></span>
      <ul class="am-dropdown-content">
        <li class="clearfix"><a href="#"><i><img src="images/header-notice.png"></i>消息<em class="header-notice-tips fr"></em></a></li>
        <li><a href="Index.html"><i><img src="images/header-home.png"></i>首页</a></li>
      </ul>
    </div>
  </header>
  <!--header-end-->
<div class="mui-content">
	  
	  <div class="mui-card">
	  
		<div class="mui-card-header">{{msgTypeLable}} </div>
		<div class="mui-card-content">
			<div class="mui-card-content-inner" v-html="wsMessageRecord.wsMessage.msgContent">

			</div>
		</div>
	
		<div class="mui-card-footer">{{sendDate}}</div>
	</div>
</div>
</div>
<!--container-end-->
<script src="js/mui.min.js"></script>
<script src="js/wxshop.js"></script>
<script src="js/vue.js"></script>
<script>
	var vm = new Vue({
		el: '#indexVm',
		data: {
			messagenum: "0",
			wsMessageRecord: '',
			msgTypeLable:'',
			sendDate:'',
		},
		created: function () {
			mui.ajax(wxshop.serverUrl+"/msg/detail", {
				type: "post",
				data:{
					code:wxshop.getUrlParam("code"),
					msgId:wxshop.getUrlParam("msgId"),
				},
				dataType: "json",
				success: function(data) {
					if(data.ret==0){
						mui.alert(data.msg);
					}
					if(data.ret==2){
						wxshop.getOpenId(data.appid);
					}	
					vm.messagenum=data.messagenum;
					vm.wsMessageRecord=data.wsMessageRecord;
					vm.msgTypeLable=data.msgTypeLable;
					vm.sendDate=data.sendDate;
				},
				error: function(xhr,type,errorThrown) {
					mui.alert("后台接口请求失败，请联系管理员！错误"+errorThrown);
				}
			});
		},
	});
</script>
</body>
</html>
